using System;
using System.Collections.Generic;

namespace Battle.TimelineLog
{
    /// <summary>
    /// 虚拟地图格子，用来放置阵型之类的数据
    /// </summary>
    public class VirtualMap
    {
        /// <summary>
        /// 地图总行数
        /// </summary>
        public int Row { get; protected set; }
        /// <summary>
        /// 地图总列数
        /// </summary>
        public int Col { get; protected set; }
        public List<int> Grids;
        public VirtualMap() { }
        public void Init(int row, int col)
        {
            Row = row;
            Col = col;

            Grids = new List<int>(new int[col * row]);
        }

        public void SetItem(int row, int col, int side, int id)
        {
        }
        public void SetItem(int row, int col, int id)
        {
            int idx = Math.Max(row - 1, 0) * col + col;
            SetItem(idx, id);
        }
        public void SetItem(int idx, int id)
        {
            Grids[idx] = id;
        }
    }
}